package org.example.spring_principle;

import org.example.autoconfig.BiteConfig;
import org.example.autoconfig.EnableBiteConfig;
import org.example.autoconfig.MyImport;
import org.example.autoconfig.MyRegistrar;
import org.example.spring_principle.model.Dog;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
@EnableBiteConfig
//@Import(MyImport.class)
//@Import(BiteConfig.class)
//@ComponentScan({"org.example.autoconfig","org.example.spring_principle"})
@Import(MyRegistrar.class)
@SpringBootApplication
public class SpringPrincipleApplication {

    public static void main(String[] args) {

        ApplicationContext context = SpringApplication.run(SpringPrincipleApplication.class, args);
        BiteConfig bean = context.getBean(BiteConfig.class);
        bean.use();
    }

}
